﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="cache-control" content="no-cache">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <title id="layoutTitle">{{name}}</title>
    <link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon.png">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/jquery/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap-datetimepicker.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/font-awesome/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/toastr/toastr.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/klorofil/main.css">
    <link rel="stylesheet" type="text/css" href="~/Content/aztech-style.css">
    @RenderSection("styles", required: false)

    <script type="text/javascript" src="~/Scripts/vendor/modernizr-2.6.2.js"></script>    
</head>
<body>

    <!-- 母版内容 -->
    <div id="wrapper">
        <!-- 顶部导航栏 -->
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container-fluid">
                <!-- 全局用的加载图标元素 -->
                <div class="navbar-btn aztech-loading">
                    <button type="button" class="btn-toggle-fullwidth"><i class="fa fa-spinner fa-spin"></i></button>
                </div>
                <div class="navbar-btn">
                    <button type="button" class="btn-toggle-fullwidth"><i class="fa fa-navicon"></i></button>
                </div>
                <div id="navbar-menu">
                    <ul class="nav navbar-nav navbar-right">
                        <li id="layoutUserInfo" class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-user-circle-o"></i> <span>{{user.Name}}</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="#" v-on:click="EditUser(user.ID)">
                                        <i class="fa fa-id-card"></i> <span>用户资料User data</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="/Account/Logout">
                                        <i class="fa fa-sign-out"></i> <span>登出Logout</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <i class="fa fa-copyright"></i> <span>系统版本 v1.0 System version v1.0</span>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
        <!-- END -->
        <!-- 左边菜单栏 -->
        <div id="sidebar-nav" class="sidebar">
            <div class="sidebar-scroll">
                <nav id="layoutLeftMenu">
                    <ul class="nav" v-for="(item, index) in menus">
                        <li v-if="!item.SubRoles || item.SubRoles.length == 0" v-has-role="item.BaseInfo.ID">
                            <a v-bind:href="item.BaseInfo.PagePath" v-bind:class='window.location.href.indexOf(item.BaseInfo.PagePath) > 0 ? "active" : ""'>
                                <i v-bind:class="item.BaseInfo.Icon"></i><span>{{item.BaseInfo.PageName}}</span>
                            </a>
                        </li>
                        <li v-if="item.SubRoles && item.SubRoles.length > 0"  v-has-role="item.BaseInfo.ID">
                            <a v-bind:href='"#subPages" + index' data-toggle="collapse" :class='window.location.href.indexOf(item.BaseInfo.PagePath) > 0 ? "active" : "collapsed"'>
                                <i v-bind:class="item.BaseInfo.Icon"></i><span>{{item.BaseInfo.PageName}}</span><i class="icon-submenu fa fa-chevron-right"></i>
                            </a>
                            <div v-bind:id='"subPages" + index' v-bind:class='window.location.href.indexOf(item.BaseInfo.PagePath) > 0 ? "collapse in" : "collapse"'>
                                <ul class="nav" v-for="(subItem, subIdx) in item.SubRoles">
                                    <li  v-has-role="subItem.ID">
                                        <a v-bind:href='subItem.PagePath' v-bind:class='window.location.href.indexOf(subItem.PagePath) > 0 ? "active" : ""'>
                                            <i v-bind:class="subItem.Icon"></i><span>{{subItem.PageName}}</span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="aztech-brand">
                <a href="/Home/Index">
                    <img src="~/Images/aztech-logo.png" alt="Aztech Logo" class="img-responsive logo">
                </a>
            </div>
        </div>
        <!-- END -->
        <!-- 中间内容 -->
        <div class="main">
            <div class="main-content">
                @RenderSection("feature", required: false)
                @RenderBody()

                <!-- 自定义模态框和IFrame内容自适应 -->
                <div class="modal fade aztech-modal" tabindex="-1" role="dialog">
                    <div class="modal-dialog aztech-modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                                <button type="button" class="aztech-modal-loading">
                                    <i class="fa fa-spinner fa-spin"></i>
                                </button>
                                <h4 class="modal-title aztech-modal-title text-center">标题title</h4>
                            </div>
                            <div class="modal-body">
                                <iframe class="aztech-modal-iframe" src="#" scrolling="no"></iframe>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal-dialog -->
                </div><!-- /.aztech-modal -->
            </div>
        </div>
    </div>

    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/klorofil/klorofil-common.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/respond.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/vue/vue.min.js"></script>
    <script type="text/javascript" src="~/Scripts/aztech-global.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/aztech-script.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/pageJs/Shared/_Layout.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    @RenderSection("scripts", required: false)

</body>
</html>
